[26.04_linux-nvidia] BPMP ACPI + SoC Hub MBWT sysfs for T410/NVL72#420
Closed
kobak2026 wants to merge 3 commits into
Closed
[26.04_linux-nvidia] BPMP ACPI + SoC Hub MBWT sysfs for T410/NVL72#420kobak2026 wants to merge 3 commits into
kobak2026 wants to merge 3 commits into
Conversation
Refactor the BPMP driver by moving channel initialization and Device Tree resource parsing into separate helper functions. This prepares the driver for ACPI support, where these helpers will be skipped because channel initialization is handled by ACPI AML methods on ACPI-based systems. Signed-off-by: Aniruddha Rao <anrao@nvidia.com> (backported from V4 internal mail <20260423140823.2848045-2-anrao@nvidia.com>) Signed-off-by: Koba Ko <kobak@nvidia.com>
This patch adds required changes in the Tegra BPMP driver to make it compatible with ACPI based platforms. On ACPI systems, IPC is handled through the AML method instead of the core kernel framework using Mailboxes and IVC. Bypass clock, reset and powergate init calls as these are not controlled by the Linux drivers on ACPI based systems. Signed-off-by: Aniruddha Rao <anrao@nvidia.com> (backported from V4 internal mail <20260423140823.2848045-3-anrao@nvidia.com>) [kobak: Add !ACPI_HANDLE(bpmp->dev) guard around bpmp->soc->ops->init because ACPI match driver_data=0 makes bpmp->soc NULL; make BPMP debugfs directory per-device on ACPI systems to avoid duplicate /sys/kernel/debug/bpmp collision on dual NVDA3001 instances.] Signed-off-by: Koba Ko <kobak@nvidia.com>
Tegra410 exposes memory bandwidth QoS for PCIe and GPU UPHY traffic on the path to DRAM. Each bandwidth group can cap PCIe read, PCIe write, or combined GPU UPHY read and write traffic, with target limits. The memory bandwidth QoS is not exposed as ordinary host MMIO and cannot be controlled from the kernel. The bandwidth limits can be programmed by sending the corresponding requests (MBWT MRQ) to the BPMP. On Tegra410, an ACPI-based platform, Linux BPMP driver does not use the device-tree mailbox path for communicating with the BPMP firmware. As a result, there is no existing client driver or interface that can be used to send the memory bandwidth requests to the BPMP. This patch exposes a sysfs directory mbwt_control on the tegra-bpmp platform device with pcie_instance_id, vc_type, and bandwidth. Writing bandwidth issues an MBWT_SET for the selected group (pcie_instance_id) and traffic class (vc_type). A read issues MBWT_GET and returns pcie_instance_id, vc_type, and the bandwidth value reported by firmware. These attributes are exposed only if MBWT QUERY probe reports both MBWT_SET and MBWT_GET commands as supported. ABI documented in Documentation/ABI/testing/sys-platform-tegra-bpmp Signed-off-by: Aniruddha Rao <anrao@nvidia.com> (backported from V4 internal mail <20260423140823.2848045-4-anrao@nvidia.com>) [kobak: Keep functional MRQ_SOCHUB_MBWT ABI definitions and sysfs interface from V4; condense verbose per-field ABI comments while preserving enum/struct layout and Documentation/ABI coverage.] Signed-off-by: Koba Ko <kobak@nvidia.com>
Contributor
PR Validation ReportPatchscan ✅ No Missing FixesAll cherry-picked commits checked — no missing upstream fixes found. PR Lint ❌ Errors foundDetailsChecking 3 commits... Cherry-pick digest: ┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐ │ Local │ Referenced upstream / Patch subject │ Patch-ID │ Subject │ SoB chain │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ b996c9ae132b │ [SAUCE] tegra: bpmp: add sysfs for memory bandwidth qos │ N/A │ N/A │ anrao, kobak │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 41397c0b5b2e │ [SAUCE] tegra: bpmp: add acpi support │ N/A │ N/A │ anrao, kobak │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ d1469aca0db0 │ [SAUCE] tegra: bpmp: move channel, resource init to helper │ N/A │ N/A │ anrao, kobak │ └──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘ Lint: all checks passed. PR metadata: E: PR targets 26.04_linux-nvidia but body has no https://bugs.launchpad.net/... link |
Collaborator
|
@kobak2026 This PR can be closed as we do not want WIP VR content on the 7.0-LTS kernel (we only targeting 7.0-bos kernel for VR). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport Aniruddha's V4 internal-review 3-patch BPMP ACPI + SoC Hub MBWT sysfs series to the 7.0-HWE / 26.04 LTS kernel branch. This is the V4 internal-mail design, not PR352's older export/unexport sysfs layout.
This is based on Aniruddha's V4 internal-review series; V5 is under review, so material upstream deltas will be handled as a follow-up refresh if needed.
V4 vs PR352
/sys/bus/platform/devices/NVDA3001:NN/mbwt_control/{pcie_instance_id,vc_type,bandwidth}.bandwidthreads back a 3-tuple:<pcie_instance_id> <vc_type> <bandwidth>.mbwt_controlis guarded by BPMPQUERY_ABIsupport for both GET_BW and SET_BW.bpmp-tegra410.cis introduced; the BPMP ACPI path is integrated into the existing driver structure./sys/class/bpmp_mbwt/.../{export,unexport,mbwtN}model is intentionally not carried forward.Commits
d1469aca0db0a15590718dd0cfca8f661ebcd269-NVIDIA: VR: SAUCE: tegra: bpmp: Move channel, resource init to helper41397c0b5b2e30b3e3f70f13ebe10e48f448e00a-NVIDIA: VR: SAUCE: tegra: bpmp: Add ACPI supportb996c9ae132bc2fea923a044d9851578eb1cda8b-NVIDIA: VR: SAUCE: tegra: bpmp: Add sysfs for memory bandwidth QoSValidation
LTS runtime validation on
comp016:7.0.0-sudeep-test-dgx16100-v4.mbwt_controlpresent under bothNVDA3001:00andNVDA3001:01platform devices.PASS=16 FAIL=0 SKIP=1./dev/nvme0n1, socket00:100 GB/sbaseline:READ: bw=13.3GiB/s (14.3GB/s).50 GB/s:READ: bw=13.8GiB/s (14.8GB/s).10 GB/s:READ: bw=9344MiB/s (9798MB/s).1 GB/s:READ: bw=972MiB/s (1019MB/s).100 GB/srecovery:READ: bw=13.8GiB/s (14.8GB/s).10 GB/scaps near 10 GB/s,1 GB/scaps near 1 GB/s, and recovery returns to uncapped bandwidth.Debugfs note: the first runtime run observed the known duplicate BPMP debugfs warning (
debugfs: 'bpmp' already exists in '/',tegra-bpmp NVDA3001:01: debugfs initialization failed: -12). The current commits include the per-device debugfs fix, build-verified.